<?php
include 'order_confirm.class.php';
?>
<meta charset="UTF-8">
<head>
<script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/admin.js"></script>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../css/base.css" type="text/css" media="screen" />
</head>
<body style="background:none; margin:30px 30px 0 0;">
	<table class="goods_cart_from">
		<tr>
			<td>订单号</td>
			<td>商品</td>
			<td>下单时间</td>
			<td>用户</td>
			<td>操作</td>
		</tr>
		
		<?php
		foreach($order as $val){
			
		?>
		
		<tr>
			<td><?php echo $val['orders_id'];?></td>
			<td><?php foreach($val['product'] as $v){echo $v['name'];}?></td>
			<td><?php echo $val['create_time'];?></td>
			<td><?php echo $val['create_user'];?></td>
			<td>
				<?php if($val['status'] == 1){?>
				<form method="POST" action="alipay/sendgoods.php">
					<input type="hidden" name="orders_id" value="<?php echo $val['orders_id']?>">
					<input type="hidden" name="trade_no" value="<?php echo $val['alipay_id']?>">
					<select name="logistics_name">
						<option value="申通">申通</option>
						<option value="圆通">圆通</option>
						<option value="中通">中通</option>
						<option value="韵达">韵达</option>
						<option value="EMS">EMS</option>
						<option value="平邮">平邮</option>
					</select>
					物流单号：<input type="text" name="invoice_no">
					<input type="submit" name="submit" value="确认发货">
				</form>
				<?php }else if($val['status'] >= 2){?>
				<form method="POST">
					<input type="hidden" name="orders_id" value="<?php echo $val['orders_id']?>">
					<input type="submit" name='submit' value="完成订单">
				</form>
				<?php }?>
			</td>
		</tr>
		
		<?php }?>
		
	</table>
</body>